﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web.master" AutoEventWireup="true"
    CodeFile="AreaManager.aspx.cs" Inherits="Systems_AreaManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../Scripts/validform.js" type="text/javascript"></script>
    <script src="../Scripts/YJPopup.js" type="text/javascript"></script>
    <script src="../Scripts/GiveTip.js" type="text/javascript"></script>
    <script type="text/javascript">
        var MyPopup;
        $(document).ready(function () {
            MyPopup = new YJPopup({
                contentDivID: "NsContentDiv",
                dragBarDivID: "NsDragBar",
                dragable: true,
                autoCreate: true
            });
            $.checkForm();
        });
        function ShowPopup(ID) {
            MyPopup.Show("600px", "115px", "修改", "AreaModify.aspx?ID=" + ID + "&_" + Math.random());
        }
        function ClosePopup() {
            MyPopup.Hide();
        } 
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table class="tabContent">
        <tr>
            <th lang="th">
                地区添加
            </th>
        </tr>
        <tr>
            <td lang='td'>
                <table style="border-collapse: separate" cellpadding="2">
                    <tr>
                        <td>
                            地区名称：
                        </td>
                        <td>
                            <NC:FTextBox ID="txtAreaName" Width="100px" runat="server" />
                        </td>
                        <td>
                            地区编号：
                        </td>
                        <td>
                            <NC:FTextBox ID="txtAreaNumber" Width="100px" runat="server" CheckGroup="Add" />
                        </td>
                        <td>
                            车牌号：
                        </td>
                        <td>
                            <NC:FTextBox ID="txtCarnumber" Width="100px" runat="server" EnableNull="true" CheckGroup="Add" />
                        </td>
                        <td>
                            <asp:Button ID="benAdd" runat="server" class="btn" Text="添加" OnClick="btnAdd_Click" />
                            <asp:Button ID="btnBindData" runat="server" Text="更新" uncheck="true" CssClass="hidden"
                                OnClick="btnBindData_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <th colspan="4" lang="th">
                地区列表
            </th>
        </tr>
        <tr>
            <td lang="td">
                <table style="border-collapse: separate" cellpadding="2">
                    <tr>
                        <td valign="bottom">
                            <asp:Label ID="LabPath" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
                <NC:FGridView ID="FGridView1" runat="server" AutoCreateNumber="true" DataKeyNames="ID"
                    Width="600px" ShowFooter="true" PageSize="20">
                    <Columns>
                        <asp:TemplateField HeaderText="地区名称" ItemStyle-Width="200px">
                            <ItemTemplate>
                                <a title='点击查看下级' href='AreaManager.aspx?mid=<%# Request.QueryString["mid"] %>&area=<%# Eval("AreaNumber")%>'>
                                    <%# Eval("AreaName")%></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="AreaNumber" HeaderText="地区编码" ItemStyle-Width="200px" />
                        <asp:BoundField DataField="ShortAreaName" HeaderText="车牌号" ItemStyle-Width="100px" />
                        <asp:TemplateField HeaderText="操作" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <input type="button" class="Gridbtn" value="修改" id="UpdateButton" onclick="ShowPopup('<%# Eval("ID") %>')">
                                <asp:Button runat="server" class="Gridbtn" Text="删除" ID="DelButton" uncheck="true"
                                    OnClick="DelButton_Click" OnClientClick="GiveTip(event,'您确定删除吗？');" CommandArgument='<%# Eval("ID") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </NC:FGridView>
            </td>
        </tr>
    </table>
</asp:Content>
